package com.example.demo.api.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//RestExceptionHandler
@RestControllerAdvice
public class MyExceptionHandler{

    @ExceptionHandler(TestException.class)
    public String testError(){
        return "error -----";
    }
}
